#include "stdio.h"

int binarySearch(double values[], double key, int length)
{
	for(int i = 0; i < length; i++)
	{
		if(values[i] >= key)
			return i;
	}
	return 0;
}

int main()
{
	double values[280];
	double temp = 0.0;
	int i;
	values[0] = 0;
	for(i = 1; i < 280 ; i++)
	{
		temp += (double)1/(double)(i + 1);
		values[i] = temp;
		//printf("%lf", values[i]);
	}

	double key[1024];
	double t = -1.0;
	int index = 0;
	while(t != 0.0)
	{
		scanf("%lf", &t);
		key[index] = t;
		index++;
	}
 
	for(i = 0; i < index - 1; i++)
	{
		//printf("%lf\n", key[i]);
		printf("%d card(s)\n", binarySearch(values, key[i], 280));
	}
	
	return 0;
}